Dynamic Objects

Dynamic Objects are objects that can be affected by the laws of physics in a PhSim simulation.

Dynamic Objects are created using the PhSim.DynObject constructor.

Dynamic Objects are associated with a Matter.js body. The matter.js body is found in PhSim.DynObject.prototype.matter.

Moving Dynamic Objects

Dynamic objects can undergo motion in several ways. First, they are affected by gravity. Second, there are functions in the PhSim.Motion namespace that can make objects move:

Dynamic Objects can be moved using widgets as well.